<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <tr>
        <td>用户id</td>
        <td>用户姓名</td>
        <td>用户年龄</td>
        <td>学号</td>
        <td>班级</td>
        <td>订单</td>
        <td>删除</td>
        <td>更新</td>
    </tr>
    <tr th:each="person:${personlist}">
        <td th:text="${person.id}"></td>
        <td th:text="${person.name}"></td>
        <td th:text="${person.age}"></td>
        <td th:if="${person.idcardid} ne null" th:text="${person.idcardid.stuid}"></td>
        <td th:if="${person.idcardid} ne null" th:text="${person.idcardid.classname}"></td>
        <td>
            <ul th:if="${person.orderList} ne null" th:each="order:${person.orderList}">
                <li th:text="${order.orderinfo}"></li>
                <div th:each="product:${order.productList}">
                    <div th:text="${product.name}"></div>
                </div>
            </ul>
        </td>
        <td>
            <a th:href="@{deletepersonbyid(id=${person.id},idcardid=${person.idcardid.id})}">删除用户</a>
        </td>
        <td>
            <a th:href="@{updateperson(id=${person.id},age=${person.age},name=${person.name})}">更新用户</a>
        </td>
    </tr>
</table>
</body>
</html>